#include <cstdio>
#include <algorithm>
#include <cmath>
using namespace std;
int main(void){
    int t;
    int n;
    double ans;
    scanf("%d",&t);
    while(t--){
        ans=0;
        scanf("%d",&n);
        for(int i=2;i<=n;i++){
            ans+=log10(i);
        }
        printf("%d\n",(int)ans+1);
    }
    return 0;
}